package com.naiterui.ehp.bs.esign.service;

import com.naiterui.ehp.bp.bo.esign.WillTypeBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.esign.api.bjca.vo.SignFileUploadVO;
import com.naiterui.ehp.bs.esign.api.vo.FaceNoticeVO;
import com.naiterui.ehp.bs.esign.api.vo.SignAccountVO;
import com.naiterui.ehp.bs.esign.api.vo.SignAuthResultVO;
import com.naiterui.ehp.bs.esign.api.vo.SignCallbackVO;
import com.naiterui.ehp.bs.esign.vo.esign.PreSignResultVO;

import java.util.List;
import java.util.Map;

/**
 * @author guoyongxiang
 * @date 2019/12/2 10:58
 * @since 1.0.0
 */
public interface IEsignService {


    /**
     * 根据名字生成本地签章图片
     * @param name
     * @return
     * @throws BusinessException
     */
    String createPersonalSeal(String name, String userType, String typeface) throws BusinessException;


    /**
     * PDF预签署
     *
     * @param signFileUploadVO
     *
     * @return
     *
     * @throws BusinessException
     */
    PreSignResultVO preSignPdf(SignFileUploadVO signFileUploadVO, SignAccountVO accountVO) throws BusinessException;

    /**
     * 回调-用户审核
     *
     * @param openId
     * @param phone
     * @param status
     * @param reason
     */
    void userAuth(String openId, String phone, String status, String reason) throws BusinessException;

    /**
     * 回调-用户审核
     *
     * @param resultVO
     *
     * @throws BusinessException
     */
    void userAuth(SignAuthResultVO resultVO) throws BusinessException;

    /**
     * 签名
     *
     * @param signFileUploadVO
     *
     * @throws BusinessException
     */
    void sign(SignFileUploadVO signFileUploadVO, SignAccountVO accountVO) throws BusinessException;

    /**
     * 回调-签名结果
     *
     * @param signCallbackVO
     */
    void signResult(SignCallbackVO signCallbackVO) throws BusinessException;

    /**
     * 人脸识别认证结果
     *
     * @param faceNoticeVO
     */
    void faceNotice(FaceNoticeVO faceNoticeVO);

    /**
     * 获取用户实名状态
     *
     * @param userId
     * @param userType
     *
     * @return
     *
     * @throws BusinessException
     */
    Integer getUserAuthStatus(Long userId, String userType) throws BusinessException;


    /**
     * 获取医网信签名配置
     * @return
     * @throws BusinessException
     */
    Map<String, String>  getYwxSignConfig() throws BusinessException;

    /**
     * 获取意愿签署方式
     * @param willType 已选择签署方式
     * @return
     * @throws BusinessException
     */
    List<WillTypeBO> getWillTypes(String willType) throws BusinessException;

}
